#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
typedef struct a {
    int b;
    struct a* next;
}k1;
typedef struct {
    struct a* head;
    struct a* tail;
} CQueue;
typedef struct {
    int* ping;
    int size;
    int l;
} RecentCounter;
typedef struct x {
    int* x;
    int top;
    int capacity;
}k;


typedef struct {
    k* q1;
    k* q2;
} MyQueue;

MyQueue* myQueueCreate();
void myQueuePush(MyQueue* obj, int x);
int myQueuePop(MyQueue* obj);
int myQueuePeek(MyQueue* obj);
bool myQueueEmpty(MyQueue* obj);
void myQueueFree(MyQueue* obj);
RecentCounter* recentCounterCreate();
int recentCounterPing(RecentCounter* obj, int t);
void recentCounterFree(RecentCounter* obj);
CQueue* cQueueCreate();
void cQueueAppendTail(CQueue* obj, int value);
int cQueueDeleteHead(CQueue* obj);
void cQueueFree(CQueue* obj);